#!/bin/bash
# API网关Gunicorn启动脚本

cd "$(dirname "$0")"

# 配置COS凭证
export COS_SECRET_ID="AKIDAQTJzVotlSwDH8p2MZw9E855uZHo8F9u"
export COS_SECRET_KEY="jGav66wa9XkldKp9JI7kEdqulPq45vZ0"
export COS_REGION="ap-beijing"
export COS_BUCKET_NAME="photoenhancei-bj-1259206939"

# 启动Gunicorn
exec gunicorn -w 4 -b 127.0.0.1:5000 \
    --timeout 300 \
    --access-logfile ../shared/logs/gateway-access.log \
    --error-logfile ../shared/logs/gateway-error.log \
    app:app

